package com.yy.wga.pay.service.client.request.alipay;

import com.yy.wga.pay.service.client.request.BaseOauthTokenRequest;
import com.yy.wga.pay.service.client.response.alipay.AliPayOauthTokenResponse;
import com.yy.wga.pay.service.client.request.BaseOauthTokenRequest;
import com.yy.wga.pay.service.client.response.alipay.AliPayOauthTokenResponse;
import com.yy.wga.pay.service.client.request.BaseOauthTokenRequest;
import com.yy.wga.pay.service.client.response.alipay.AliPayOauthTokenResponse;
import com.yy.wga.pay.service.client.request.BaseOauthTokenRequest;
import com.yy.wga.pay.service.client.response.alipay.AliPayOauthTokenResponse;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * @Author: gc
 * @Date: 2021/6/13
 * @Description:
 **/
@EqualsAndHashCode(callSuper = true)
@Data
@ToString(callSuper = true)
public class AliPayOauthTokenRequest extends BaseOauthTokenRequest<AliPayOauthTokenResponse> {
    private static final long serialVersionUID = 4512706488463641745L;

    /**
     * 授权方式。支持： 1.authorization_code，表示换取使用用户授权码code换取授权令牌access_token。 2.refresh_token，表示使用refresh_token刷新获取新授权令牌。
     */
    @NotNull(message = "用户授权的token不能为空")
    private Integer grantType;

    /**
     * 授权码，用户对应用授权后得到
     */
    private String code;

    /**
     * 刷新令牌
     */
    private String refreshToken;

    private String appId;
}
